package com.micklebes.entity;

import com.google.appengine.api.datastore.Key;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

/**
 * User: th3sly
 * Date: 1/15/12
 * Time: 9:19 PM
 */
public class Product {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key key;

    @Persistent
    private String name;

    @Persistent
    private int amount;

    @Persistent
    private int price;

    @Persistent
    private Key storageKey;

    public Product() {
    }

    public Product(String name, int amount, int price, Key storageKey) {
        this.name = name;
        this.amount = amount;
        this.price = price;
        this.storageKey = storageKey;
    }

    public Product(Key key, String name, int amount, int price, Key storageKey) {
        this.key = key;
        this.name = name;
        this.amount = amount;
        this.price = price;
        this.storageKey = storageKey;
    }

    public Key getKey() {
        return key;
    }

    public void setKey(Key key) {
        this.key = key;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAmount() {
        return amount;
    }

    public void setAmount(int amount) {
        this.amount = amount;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public Key getStorageKey() {
        return storageKey;
    }

    public void setStorageKey(Key storageKey) {
        this.storageKey = storageKey;
    }
}
